package cn.fintecher.gis.entity;


import cn.fintecher.gis.enums.FlowResultStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "flow_history")
@Data
@ApiModel(value = "流程审批记录", description = "流程审批记录")
public class FlowHistory extends BaseEntity{

    @ApiModelProperty(notes = "流程id")
    private String flowId;

    @ApiModelProperty(notes = "审批人")
    @OneToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "user_id")
    private Operator user;

    @ApiModelProperty(notes = "审批时间")
    private Date time;

    @ApiModelProperty(notes = "状态")
    @Enumerated(EnumType.STRING)
    private FlowResultStatus status;

    @ApiModelProperty(notes = "审批意见")
    private String opinion;//审批意见
}
